1. Field of the Invention
This invention relates to digital image processing and, more specifically, to a system and method for automatically detecting and correcting occurrences of red-eye in images.
2. Background Information
Many cameras include a built-in flash for taking photographs or images in low ambient light conditions. The flash, which is activated at the same time that the camera's shutter is opened, provides sufficient light so as to prevent the resulting image from being under-exposed. Many cameras also include a light detector and can thus automatically determine when the flash is needed. As a result, these cameras are able to produce high quality images in otherwise low ambient light conditions.
However, when photographing people in low ambient light conditions, the use of a flash often results in the occurrence of “red-eye”. Red-eye is the appearance in the resulting image of an unnatural red hue in a person's eyes, most often in the pupils. Red-eye is caused by light from the flash reflecting off blood vessels in the back of the person's eyes. Furthermore, because a person's pupils are often dilated in low ambient light conditions, large and very noticeable occurrences of red-eye often appear in images taken in such conditions. In many cases, the appearance of red-eye is severe enough to ruin the image.
One method of eliminating or reducing red-eye is to provide a large lens to flash distance. More specifically, if the angle between the camera and the source of the flash, as measured from the subject being photographed, is sufficiently large (meaning there is a large distance between the camera's lens and the flash), red-eye can be eliminated. Obviously, this is not a viable solution for pocket cameras that have a built-in flash as the lens to flash distance must be small to keep the size of the camera down.
Another method of reducing red-eye, which is employed in many pocket cameras, is to contract the person's pupils before the image is taken by activating the flash one or more times before the image is taken. The flash is then activated again when the image is actually taken by the camera. This approach nonetheless has several drawbacks, the most significant of which is the resulting drain on the camera's battery caused by multiple activations of the flash for each image being taken. Indeed, because of this drain on the battery, most flashes operate in a default, single flash mode, and must be actively switched by the user into a red-eye mode in order to cause the flash to activate before the image is taken. Users, however, often forget to switch the flash's operating mode before taking an image in low light conditions, thereby ending up with an image having occurrences of red-eye.
In addition to changing the flash's operating mode, there are also several products is available for correcting red-eye in existing images. These products typically operate on electronic, i.e., digital, representations of the images. Today, the use of digital cameras, which capture images digitally, are wide-spread. In addition, scanners convert conventional photographs into digital formats. Digital or electronic images can be opened and viewed on most computer platforms, such as personal computers. Current red-eye correction software products, such as Photoshop® and PhotoDeluxe® from Adobe Systems, Inc. and PhotoDraw from Microsoft Corp. of Redmond, Wash., require a user to first display the image on his or her computer's monitor. In some of these products the user manipulates a pointing device, such as a mouse, to “paint” over the occurrences of red-eye in the displayed image. In other products, the user must precisely locate the center of the pupils so that the software can place black circles over them. Correction of red-eye using these products is often time-consuming and user-intensive. In addition, the results are often poor, sometimes looking even worse than the original occurrences of red-eye.
U.S. Pat. No. 6,278,491 to Wang et al. is directed to an “Apparatus and Method for Automatically Detecting and Reducing Red-Eye in a Digital Image”. The system of the '491 patent utilizes a face/eye detector to locate faces and/or eyes in a subject image. It then searches candidate eye regions or windows within the located faces and/or eyes for any red pixels. These red pixels are then changed to a different color or hue, such as monochrome. Although the system of the '491 patent purportedly works without user-intervention, it nonetheless has several drawbacks. First, it is believed that the system of the '491 patent is computationally intensive, i.e., consumes significant processor and memory resources. Second, it is believed that the system of the '491 patent suffers from both false positives, i.e., identifying and correcting artifacts that are not in fact occurrences of red-eye, as well as false negatives, i.e., failing to identify or correct actual occurrences of red-eye. This may be due to the fact that red-eye artifacts are identified based solely on redness.
It is also believed that the system of the '491 patent is unable to detect and/or correct occurrences of red-eye in partially opened eyes, occurrences of red-eye that are combined with other red artifacts (such as red skin), or occurrences of red-eye that do not encompass the selected candidate eye regions or windows. In addition, the system of the '491 patent appears to be limited to detecting and correcting occurrences of red-eye solely in pupils. That is, it cannot detect or correct occurrences of red-eye in other parts of the eye, such as the iris or the schlera, i.e., the white portion of the eye, which sometimes occurs. Accordingly, a need exits for a system that can detect and correct a wide variety of red-eye occurrences automatically, i.e. without user intervention, and that can do so efficiently.